﻿--Ajout de la colonne Name sur NodeInstance
IF NOT EXISTS(
Select * FROM Information_Schema.COLUMNS
where TABLE_SCHEMA = 'dbo'
AND TABLE_NAME = 'medianamik_NodeInstance'
AND Column_Name = 'Name'
)
BEGIN
	ALTER TABLE dbo.medianamik_NodeInstance ADD
	Name nvarchar(512) NULL
END


--Ajout de la colonne HasModifications sur NodeInstance
IF NOT EXISTS(
Select * FROM Information_Schema.COLUMNS
where TABLE_SCHEMA = 'dbo'
AND TABLE_NAME = 'medianamik_NodeInstance'
AND Column_Name = 'HasModifications'
)
BEGIN
	ALTER TABLE dbo.medianamik_NodeInstance ADD
	HasModifications bit NOT NULL CONSTRAINT DF_medianamik_NodeInstance_HasModifications DEFAULT 0
END

